{% extends "base.html" %}
{% load i18n %}

{% block title %} {% trans "[TITLE] Create a new folder" %} - Mr. Edu {%endblock%}

{% block section%}

	<h1>{% trans "[TITLE] Create a new folder" %}</h1>
	<form id="createCollection" action="/mrEdu/{{userRole}}/class/{{course.id}}/collection/new" method="post" accept-charset="UTF-8">
		<fieldset>
			<legend>{% trans "[LEGEND] New folder details" %}</legend>
			<input type="hidden" name="class" value="{{course.id}}">
			<p class="borderTop">
				{% if feedback%}
				<div id="feedback">
					{% for item in feedback %}
					{{item|safe}}
					{% endfor %}
				</div>
				{% endif %}
				<label>{% trans "[LABEL] Name" %}: <input class="text" type="text" id="collectionName" name="name" value="{{formData.name}}"></label>
				<br>
				<label>{% trans "[LABEL] Description" %}:
					<textarea cols="30" rows="2" id="collectionDescription" name="description">{{formData.description}}</textarea>
				</label>
				<br>
				<label>{% trans "[LABEL] Students involved" %}:
					{% if course.students.all %}
					<select multiple="multiple" id="collectionSharing" name="shareWith">
						{% for s in course.students.all %}
						<option value="{{s.id}}">{{s.last_name}} {{s.first_name}}</option>
						{% endfor %}
					</select>
					{% endif %}
				</label>
			</p>
			<input class="button submit" type="submit" value="{% trans "[BUTTON] Save" %}">
			{% csrf_token %}
		</fieldset>
	</form>
		
{%endblock%}